package com.eve.springcloud.service.impl;

import java.util.Date;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.eve.springcloud.dao.SysDeptDao;
import com.eve.springcloud.entity.SysDeptEntity;
import com.eve.springcloud.service.SysDeptService;

@Service("sysDeptService")
public class SysServiceImpl implements SysDeptService {

	@Resource
	private SysDeptDao sysDeptDao;
	
	@Override
	public int saveDept(SysDeptEntity sysDept) {
		sysDept.setCreateTime(new Date());
		int addDept = sysDeptDao.addDept(sysDept);
		return addDept;
	}

	@Override
	public SysDeptEntity findOne(Long deptId) {
		SysDeptEntity findById = sysDeptDao.findById(deptId);
		return findById;
	}

}
